﻿
02> sudo sh -c "wget -O - https://dl.openfoam.org/gpg.key > /etc/apt/trusted.gpg.d/openfoam.asc"
03> sudo rm /etc/apt/sources.list.d/*dl_openfoam_org*list
04> sudo add-apt-repository "http://dl.openfoam.org/ubuntu main dev"
06> sudo apt update
gedit ~/.bashrc <<++ source /opt/openfoam-dev/etc/bashrc
                     . /opt/openfoam-dev/etc/bashrc  
foamRun -help

> создаётся и фиксируется диресктория:

~/OpenFOAM/Khram-dev/run$ mkdir -p $FOAM_RUN

> пробуем запуск

cd $FOAM_RUN
cp -r $FOAM_TUTORIALS/incompressibleFluid/pitzDailySteady .
cd pitzDailySteady
blockMesh
foamRun
paraFoam

Usage: foamRun [OPTIONS]
options:
  -case <dir>       specify alternate case directory, default is the cwd
  -fileHandler <handler>
                    override the fileHandler
  -hostRoots <((host1 dir1) .. (hostN dirN))>
                    slave root directories (per host) for distributed running
  -libs '("lib1.so" ... "libN.so")'
                    pre-load libraries
  -noFunctionObjects
                    do not execute functionObjects
  -parallel         run in parallel
  -roots <(dir1 .. dirN)>
                    slave root directories for distributed running
  -solver <name>    Solver name
  -srcDoc           display source code in browser
  -doc              display application documentation in browser
  -help             print the usage

Using: OpenFOAM-dev (see https://openfoam.org)
Build: dev-2f65e2e2c696


https://openfoam.org/download/dev-ubuntu/

Installation
OpenFOAM-dev and ParaView can be simply installed using the apt package management tool. The user will need to provide superuser password authentication when executing the following commands with sudo.  To simplify setting up the package repositories, the following instructions add the repositories both to install version releases, e.g. version 13, and to install OpenFOAM-dev.

Open a terminal prompt (Applications → Accessories → Terminal) and copy and paste the following commands in to the terminal prompt.  Steps 2-5 should only be required once for a given system.
Install the public key (gpg.key) for the repository to enable package signatures to be verified.  (Note: use secure https:// here.)
sudo sh -c "wget -O - https://dl.openfoam.org/gpg.key > /etc/apt/trusted.gpg.d/openfoam.asc"
If you have added any repository entries for existing dl.openfoam.org previously, remove them by deleting the source list file.
sudo rm /etc/apt/sources.list.d/*dl_openfoam_org*list
Add both the main and dev repositories at dl.openfoam.org to the list of software repositories for apt to search.  (Note: use http:// since https:// may not be supported and is not required since the key provides secure authentication of the package files.)
sudo add-apt-repository "http://dl.openfoam.org/ubuntu main dev"
For Ubuntu 26.04 LTS (and, in future, newer versions) ONLY: After running the add-apt-repository command, check if a warning is reported which includes:
Warning: Skipping acquire of configured file 'main/binary-amd64v3/Packages'...
If this warning is present, apply the following command to force apt to use amd64 as the architecture name, not amd64v3.

sudo sed -i "s/^\(deb\).*\(http\)/\1 [arch=amd64] \2/" /etc/apt/sources.list.d/*dl_openfoam_org*list
Update the apt package list to account for the new download repository location.
sudo apt update
Install OpenFOAM-dev which also installs paraview as a dependency if it is not already installed.
sudo apt -y install openfoam-dev
OpenFOAM-dev is now installed in the /opt directory.

Upgrading OpenFOAM-dev
Every week, OpenFOAM-dev is recompiled into a new openfoam-dev pack within the dev repository. The package will be upgraded automatically whenever repository package files are updated and the software is upgraded, e.g. by typing

sudo apt update
sudo apt upgrade
Users can also specifically upgrade openfoam-dev only by the following option:

sudo apt update
sudo apt install --only-upgrade openfoam-dev
User Configuration
In order to use the installed OpenFOAM package, complete the following

Open the .bashrc file in the user’s home directory in an editor, e.g. by typing in a terminal window (note the dot)
gedit ~/.bashrc
At the bottom of that file, add the following line (see Note 1 below) and save the file
source /opt/openfoam-dev/etc/bashrc
Open a new terminal window (see Note 2 below) and test that the foamRun application, from the OpenFOAM package, is working by typing
foamRun -help
A “Usage” message should appear. Your installation and user configuration is complete.
Note 1: If a similar line has already been added to the user’s .bashrc file, e.g. for a previous version of OpenFOAM, then the line should be deleted or, alternatively, commented out by inserting a # at the beginning of the line.
Note 2: If a user wishes to execute foamRun in the same terminal window, they must first register the change to the .bashrc file by typing at the terminal prompt (note the dots): source $HOME/.bashrc

Getting Started
Create a project directory within the $HOME/OpenFOAM directory named <USER>-dev (e.g. chris-dev for user chris) and create a directory named run within it, e.g. by typing:

mkdir -p $FOAM_RUN
Copy across the backward facing step example and generate the mesh with blockMesh. Run the case with foamRun, using the incompressibleFluid modular solver with steady-state settings, equivalent to the simpleFoam application of old.

cd $FOAM_RUN
cp -r $FOAM_TUTORIALS/incompressibleFluid/pitzDailySteady .
cd pitzDailySteady
blockMesh
foamRun
paraFoam
Refer to the OpenFOAM User Guide to get started.
